using System;
using PropertyExpression.Common;
using PropertyExpression.ControllableQuery;

namespace PropertyExpression.PwsApplication
{
    public class InsertQuotationHeaderQuery : INonQuery
    {
        private readonly IParam<Guid> quotationID;
        private readonly IParam<IOptionalValue<Guid>> sellerID;
        private readonly IParam<IOptionalValue<Guid>> buyerID;

        public InsertQuotationHeaderQuery(
            IParam<Guid> quotationID,
            IParam<IOptionalValue<Guid>> sellerID,
            IParam<IOptionalValue<Guid>> buyerID)
        {
            this.quotationID = quotationID;
            this.sellerID = sellerID;
            this.buyerID = buyerID;
        }

        public string TransformText()
        {
            return
@"INSERT  QuotationHeader
        (QuotationID, SellerID, BuyerID)
VALUES
        (" + quotationID + ", " + sellerID + ", " + buyerID + ")";
        }
    }
}